<?php 
	$news = $this->getIndexNews()->getData();
	$favs = $this->getIndexFavs(5)->getData();
	$bottoms = $this->getBottomContents()->getData();
	Yii::log('haha');
	Yii::log(json_encode($news));
?>
<!--页面主体-->
<div class="banner-bj">
	<div class="banner">
		<div class="banner-up">
			<div class="banner-tu">
				<ul>
					<li><img src="images/banner-tu.jpg" width="100%" height="100%" /></li>
					<li><img src="images/banner-tu(1).jpg" /></li>
					<li><img src="images/banner-tu(2).jpg" /></li>
					<li><img src="images/banner-tu(3).jpg" /></li>
					<li><img src="images/banner-tu(4).jpg" /></li>
				</ul>
			</div>
			<div class="news">
				<div class="fl"> <a href="?r=news" class="ml20" style="color:#FFF">酒店新闻</a> 
				<a href="javascript:void(0)" id="btn1" class="news-left"></a> 
				<a href="javascript:void(0)" id="btn2" class="news-right"></a> </div>
				<div id="scrollDiv">
					<ul class="fl ml35">
						<?php 
							foreach ($news as $key => $value) {
								echo '<li><a href="?r=news/detail&id='.$value["id"].'">';
								echo $value["title"];
								echo '</a></li>';
							}
						?>
					</ul>
				</div>
				<script type="text/javascript" src="js/jQuery.textSlider.js"></script>
				<script type="text/javascript">
					$(document).ready(function(){
				        $("#scrollDiv").textSlider({line:1,speed:500,timer:3000});
					});
				</script>
			</div>
		</div>
		<div class="banner-down">
			<div class="banner-down-left fl mt20">
				<h1>感受管家服务·尽享特别优惠</h1>
				<h1>Quiet elegance    Graceful luxury</h1>
				<p class="ml35 mt20" id="main_fav_info">
					<?php 
						if (!empty($favs))
						{
							echo '<a style="" href="?r=fav/detail&id='.$favs[0]["id"].'">'.$favs[0]["content"].'</a>';
						}
					?>
				</p>
				<a href="?r=fav" class="a">查看更多优惠</a> </div>
			<div id="featured-area">
				<ul>
					<?php 
						foreach ($favs as $key => $value) {
							echo '<li><img src="'.$value["image"].'" content="'.$value["content"].'" link="?r=fav/detail&id='.$value["id"].'" /></li>';
						}
					?>
				</ul>
			</div>
			<div class="cb"><img src="images/bk.png" /></div>
			<div class="msg mt20"> <span>关于我们：</span><img src="images/1.png"/>
				<span><a target="_blank" href="http://e.weibo.com/2630059361/app_2271874732">新浪官方微博</a></span>
				<img src="images/2.png" /><span><a target="_blank" href="http://e.t.qq.com/hojoqc">腾讯官方微博</a></span>
				<img src="images/4.png" /><span><a target="_blank" href="http://www.facebook.com/319734091408528">我们的Facebook</a></span><img src="images/5.png" /><span>咨询电话&nbsp;&nbsp;&nbsp;<i class="f16">+86-28-8898 8888</i></span> </div>
		</div>
	</div>
</div>
<div class="main-bj">
	<div class="main">
		<table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">
			<tr>
				<td style="text-align: left; vertical-align: top;">
					<?php 
						foreach ($bottoms as $key => $value) {
							if ($key > 0)
							{
								echo '<div class="cb mt10 img-tt"><img src="images/bj-2.png" /></div>';
							}
							echo '<div class="mt15">';
							echo '<h1 class="f2x">'.$value["title"].'</h1>';
							echo '<div class="mt15">';
							echo '<img class="fl img-t" src="'.$value["image"].'" />';
							echo '<div class="img-l">';
							echo $value["content"];
							echo '</div></div></div>';
						}
					?>
						
					
				</td>
				<td width="10" style="vertical-align: top;"><img src="images/bj-3.png" /></td>
				<td width="270" style="text-align: left; vertical-align: top;">
					<div class="mt15">
						<h1 class="f2x">新浪微博</h1>
					</div>
					<iframe width="100%" height="550" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=550&fansRow=2&ptype=1&speed=300&skin=1&isTitle=1&noborder=1&isWeibo=1&isFans=1&uid=2630059361&verifier=891f03cc&dpc=1"></iframe>
				</td>
			</tr>
		</table>
	</div>
</div>